package cn.dzhang.spring.boot.service;

import java.io.Serializable;
import java.util.List;

public interface JpaService<T, ID extends Serializable> {
	List<T> findAll();

	T findById(ID id);

	T saveOrUpdate(T entity);

	List<T> saveOrUpdate(List<T> entities);

	long count();

	boolean exits(ID id);

	boolean deleteById(ID id);

	boolean delete(T entity);

	boolean deleteAll();

	boolean deleteAll(List<T> entities);
}
